package com.nercel.dsj.gksales.model.dto;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ImportResultDTO {

    private Integer success = 0;

    private Integer insert = 0;

    private Integer ignore = 0;

    private Integer failed = 0;

    private Integer update = 0;

    private List<String> messages = new ArrayList<>();

    public void addMessage(String message){
        if(!messages.contains(message)){
            messages.add(message);
        }
    }

    public void ignoreIncrement(){
        ignore ++;
    }

    public void successIncrement(){
        success ++;
    }

    public void insertIncrement(){
        insert ++;
    }

    public void failedIncrement(){
        failed ++;
    }

    public void updateIncrement(){
        update ++;
    }

}